using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[RequireComponent(typeof(Canvas))]
public class CanvasFinder : MonoBehaviour
{
    public static Dictionary<string, Canvas> Canvases = new();

    private void Awake()
    {
        Canvases.Add(gameObject.name, GetComponent<Canvas>());
    }

    public static Canvas Get(string name) => Canvases[name];
}
